package com.xzx.mr.kv;

import lombok.Data;
import org.apache.hadoop.io.Writable;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

/**
 * @author xinzhixuan
 * @version 1.0
 * @date 2024/8/10 18:21
 */
@Data
public class AnalysisValue implements Writable {
    private int sumCnt;
    private long sumDuration;

    @Override
    public void write(DataOutput out) throws IOException {
        out.writeInt(sumCnt);
        out.writeLong(sumDuration);
    }

    @Override
    public void readFields(DataInput in) throws IOException {
        sumCnt = in.readInt();
        sumDuration = in.readLong();
    }
}
